package com.wangzhen.jvm.memleak;

import java.util.HashMap;
import java.util.Map;

public class MyKey {

    private Integer key;

    public MyKey(Integer key) {
        this.key = key;
    }

    @Override
    public int hashCode() {
        return key.hashCode();
    }

    public static void main(String[] args) {
        MyKey key1 = new MyKey(10);
        MyKey key2 = new MyKey(10);
        System.out.println(key2 == key1);
    }
}
